home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / OCETemplates.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  89.7 KB  |  1,681 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        OCETemplates.a
  3. ;
  4. ;    Contains:    Apple Open Collaboration Environment Templates Interfaces.
  5. ;
  6. ;    Version:    Technology:    AOCE Toolbox 1.02
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__OCETEMPLATES__') = 'UNDEFINED' THEN
  19. __OCETEMPLATES__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  25.     include 'Events.a'
  26.     ENDIF
  27.  
  28.     IF &TYPE('__OCE__') = 'UNDEFINED' THEN
  29.     include 'OCE.a'
  30.     ENDIF
  31.  
  32.     IF &TYPE('__OCESTANDARDMAIL__') = 'UNDEFINED' THEN
  33.     include 'OCEStandardMail.a'
  34.     ENDIF
  35.  
  36.  
  37. ; ************************************************************************************************
  38. ; ********************************* Template Resource Constants: *********************************
  39. ; ***********************************************************************************************
  40.  
  41.  
  42. ;  Current versions of all the different template types: 
  43.  
  44. kDETAspectVersion                EQU        -976
  45. kDETInfoPageVersion                EQU        -976
  46. kDETKillerVersion                EQU        -976
  47. kDETForwarderVersion            EQU        -976
  48. kDETFileTypeVersion                EQU        -976
  49. ;     "Normal" separation for template IDs within the file (this is just a suggestion; you can use whatever
  50. ;    separation you like, so long as two separate templates don't have overlapping resources): 
  51.  
  52. kDETIDSep                        EQU        250
  53. ;  A few predefined base IDs (again, just suggestions): 
  54.  
  55. kDETFirstID                        EQU        1000
  56. kDETSecondID                    EQU        1250
  57. kDETThirdID                        EQU        1500
  58. kDETFourthID                    EQU        1750
  59. kDETFifthID                        EQU        2000
  60. ;     Templates consist of a set of associated resources, at constant offsets from a "base ID" set by the
  61. ;    signature resource of the template. In the case of aspect templates, most of the resources in the
  62. ;    template are accessible from the template as property default values. The property number is the same
  63. ;    as the offset from the base ID of the resource. In describing the resources which make up templates,
  64. ;    we give the type, the offset, and a description. For aspect templates, the offset is also the property #. 
  65. ;    
  66. ;    All templates include the following resource fork resources:
  67. ;
  68. ;     Type    Offset                        Description
  69. ;     ----    ------                        -----------
  70. ;    'rstr'    kDETTemplateName            Contains the name of the template
  71. ;
  72. ;
  73.  
  74.  
  75. kDETTemplateName                EQU        0
  76. ;     Aspects, info-pages, and forwarders include the following as well:
  77. ;
  78. ;     Type    Offset                        Description
  79. ;     ----    ------                        -----------
  80. ;    'rstr'    kDETRecordType                Contains the type of record this applies to
  81. ;    'rstr'    kDETAttributeType            Contains the type of attribute this applies to
  82. ;    'detn'    kDETAttributeValueTag        Contains the tag of the attribute values this applies to
  83. ;
  84. ;
  85.  
  86.  
  87. kDETRecordType                    EQU        1
  88. kDETAttributeType                EQU        2
  89. kDETAttributeValueTag            EQU        3
  90.  
  91. ;  ************************************ Aspects 
  92. ;     In the case of aspects, property numbers and resource id offsets are the same. Therefore, some of the following
  93. ;    defines are used for resource offsets, some are used for dynamically generated properties, and some are used for
  94. ;    both (i.e., properties which may be dynamically generated, but if they aren't, then they're taken from the
  95. ;    resource). Resource types are given in all cases below; even if there is no actual resource (for example in
  96. ;    the case of kDETAspectName), it indicates the type for the dynamically generated property. A resource type of
  97. ;    'rstr' corresponds to a property type of kDETPrTypeString; type 'detn' corresponds to kDETPrTypeNumber; and
  98. ;    'detb' corresponds to kDETPrTypeBinary.
  99. ;
  100. ;     Type    Offset                        Description
  101. ;     ----    ------                        -----------
  102. ;    'deta'    0                            Identifies the type of resource
  103. ;    'detc'    kDETCode                    Is the code resource, if any is used
  104. ;    'ICN#'    kDETAspectMainBitmap
  105. ;    'icl8'    kDETAspectMainBitmap
  106. ;    'icl4'    kDETAspectMainBitmap
  107. ;    'ics#'    kDETAspectMainBitmap
  108. ;    'ics8'    kDETAspectMainBitmap
  109. ;    'ics4'    kDETAspectMainBitmap
  110. ;    'sicn'    kDETAspectMainBitmap        Is the icon suite to display for this item type (main aspect only)
  111. ;    'rstr'    kDETAspectName                Contains the name of the item (attribute main aspect only)
  112. ;    'rst#'    kDETAspectCategory            Contains the internal categories for the record type (main aspect only)
  113. ;    'rst#'    kDETAspectExternalCategory    Contains the external (user-visible) names which correspond to the categories in
  114. ;                                        kDETAspectCategory; if this resource is not present, external names are taken from
  115. ;                                        another template; if no other template provides an external name for a given internal
  116. ;                                        category, the internal name is used as the external name (main aspect only)
  117. ;    'rstr'    kDETAspectKind                Is the item kind to display (main aspect only)
  118. ;    'detn'    kDETAspectGender            Is the gender of this kind of object for internationalization (main aspect only)
  119. ;    'rstr'    kDETAspectWhatIs            Is the string for balloon help when item is in sublist (main aspect only)
  120. ;    'rstr'    kDETAspectAliasKind            Is the item kind to display for aliases to this type of item (main aspect only)
  121. ;    'detn'    kDETAspectAliasGender        Is the gender of an alias to this kind of object for internationalization (main aspect only)
  122. ;    'rstr'    kDETAspectAliasWhatIs        Is the string for balloon help when an alias to the item is in sublist (main aspect only)
  123. ;    'rst#'    kDETAspectBalloons            Is a list of strings for balloon help; for each item in an info-page, it's
  124. ;                                        property # times 2 is used as an index into this array; if the item is not editable,
  125. ;                                        then the property # times 2 plus 1 is used
  126. ;    'rstr'    kDETAspectNewMenuName        Is the string to be used for the user to select new item creation; for records, the
  127. ;                                        string is used as a menu entry in the Catalogs menu; for attributes, the string
  128. ;                                        is used in a selection dialog invoked by an "Add..." button
  129. ;    'rstr'    kDETAspectNewEntryName        Is the name to be used for new records (with a digit appended if not unique)
  130. ;    'detb'    kDETAspectNewValue            Is the value to use when creating a new attribute value; the first four bytes
  131. ;                                        is the tag; the rest is the attribute value contents
  132. ;    'detn'    kDETAspectSublistOpenOnNew    If true (non-zero), automatically open newly created entries (property can be set
  133. ;                                        from a code resource, or via a default value in a resource)
  134. ;    'dett'    kDETAspectLookup            Is the attribute-to-property translation table
  135. ;    'rstr'    kDETAspectDragInString        Is a string describing the action of dragging into this aspect (if any)
  136. ;    'rstr'    kDETAspectDragInVerb        Is a single, short word that's the verb of the action (like "add" or "drop"; if
  137. ;                                        there's any doubt, use "OK")
  138. ;    'rstr'    kDETAspectDragInSummary        Is a short phrase that describes the action, suitable to be included in a selection list
  139. ;    'rst#'    kDETAspectRecordDragIn        Is a list of type pairs; in each pair, the first is the type of a record which
  140. ;                                        can be dragged into this aspect, and the second is the attribute type to store
  141. ;                                        the reference in
  142. ;    'rst#'    kDETAspectRecordCatDragIn    Is a list of category/attribute type pairs; in each pair, the first is the
  143. ;                                        category of records which can be dragged in, and the second is the type of
  144. ;                                        attribute to place the alias in
  145. ;    'rst#'    kDETAspectAttrDragIn        Is a list of type triples; in each triple, the first is the record type which can be
  146. ;                                        dragged from (or "" for any), the second is the attribute type which can be dragged
  147. ;                                        in, and the third is the attribute type to store the new attribute in
  148. ;    'rst#'    kDETAspectDragOut            Is a list of attribute types which can be dragged out of this aspect (an 'rst#'
  149. ;                                        resource with no entries means nothing can be dragged out; no 'rst#' resource means
  150. ;                                        everything can be dragged out)
  151. ;    'detm'    kDETAspectViewMenu            Is a table to fill in the view menu from
  152. ;    'detp'    kDETAspectReverseSort        Is a table listing which properties to sort in reverse order
  153. ;    'detw'    kDETAspectInfoPageCustomWindow    Is a specification of a custom window size/placement & whether to use the
  154. ;                                            page-selector (main aspect only)
  155. ;    'detv'    kDETAspectInfoPageCustomWindow    Is a view list which is common to all info-pages (main aspect only)
  156. ;
  157.  
  158.  
  159. kDETAspectCode                    EQU        4
  160. kDETAspectMainBitmap            EQU        5
  161. kDETAspectName                    EQU        6
  162. kDETAspectCategory                EQU        7
  163. kDETAspectExternalCategory        EQU        8
  164. kDETAspectKind                    EQU        9
  165. kDETAspectGender                EQU        10
  166. kDETAspectWhatIs                EQU        11
  167. kDETAspectAliasKind                EQU        12
  168. kDETAspectAliasGender            EQU        13
  169. kDETAspectAliasWhatIs            EQU        14
  170. kDETAspectBalloons                EQU        15
  171. kDETAspectNewMenuName            EQU        16
  172. kDETAspectNewEntryName            EQU        17
  173. kDETAspectNewValue                EQU        18
  174. kDETAspectSublistOpenOnNew        EQU        19
  175. kDETAspectLookup                EQU        20
  176. kDETAspectDragInString            EQU        21
  177. kDETAspectDragInVerb            EQU        22
  178. kDETAspectDragInSummary            EQU        23
  179. kDETAspectRecordDragIn            EQU        24
  180. kDETAspectRecordCatDragIn        EQU        25
  181. kDETAspectAttrDragIn            EQU        26
  182. kDETAspectAttrDragOut            EQU        27
  183. kDETAspectViewMenu                EQU        28
  184. kDETAspectReverseSort            EQU        29
  185. kDETAspectInfoPageCustomWindow    EQU        30
  186. ;  Properties: 
  187.  
  188. kDETNoProperty                    EQU        -1
  189. ;  Each aspect has 250 attribute properties in this range: 
  190.  
  191. kDETFirstLocalProperty            EQU        0
  192. kDETLastLocalProperty            EQU        249
  193. ;  Developers should use property numbers starting at this point: 
  194.  
  195. kDETFirstDevProperty            EQU        40
  196. ;  The following range provides constant numeric properties for use in patterns and comparisons (constant n is
  197. ;  
  198. ;   given by kDETFirstConstantProperty+n): 
  199.  
  200.  
  201. kDETFirstConstantProperty        EQU        250
  202. kDETLastConstantProperty        EQU        499
  203. ;  To convert a number into a constant property, add this: 
  204.  
  205. kDETConstantProperty            EQU        250
  206. kDETZeroProperty                EQU        250
  207. kDETOneProperty                    EQU        251
  208. kDETFalseProperty                EQU        250
  209. kDETTrueProperty                EQU        251
  210. ;  The following apply to records, attributes, or aliases; they are the name and kind, as they appear in icon lists: 
  211.  
  212. kDETPrName                        EQU        3050
  213. kDETPrKind                        EQU        3051
  214. ;  Access mask properties: 
  215.  
  216. kDETDNodeAccessMask                EQU        25825                ; The DNode access mask 
  217. kDETRecordAccessMask            EQU        25826                ; The record access mask 
  218. kDETAttributeAccessMask            EQU        25827                ; The attribute access mask 
  219. kDETPrimaryMaskByBit            EQU        25828                ; A set of sixteen properties to access all bits of the primary mask 
  220. ;  See AOCE documentation for details definitions of each of these bits: 
  221.  
  222. kDETPrimarySeeMask                EQU        25828
  223. kDETPrimaryAddMask                EQU        25829
  224. kDETPrimaryDeleteMask            EQU        25830
  225. kDETPrimaryChangeMask            EQU        25831
  226. kDETPrimaryRenameMask            EQU        25832
  227. kDETPrimaryChangePrivsMask        EQU        25833
  228. kDETPrimaryTopMaskBit            EQU        25843
  229. ;  The following property is zero until we've completed the first catalog lookup; from then on it's 1 
  230.  
  231. kDETPastFirstLookup                EQU        26550
  232. ;  The following property is the page number; issuing a property command with this property will flip info-pages 
  233.  
  234. kDETInfoPageNumber                EQU        27050
  235. ;  The value of the following properties contains the template number of the targeted aspect's template, and the
  236. ;   currently open info-page (if any). These values can be used with kDETAspectTemplate and kDETInfoPageTemplate
  237. ;   target selectors. 
  238.  
  239.  
  240. kDETAspectTemplateNumber        EQU        26551
  241. kDETInfoPageTemplateNumber        EQU        26552
  242. ;  Properties for property commands to deal with sublist items: 
  243.  
  244. kDETOpenSelectedItems            EQU        26553                ; Open selected sublist items 
  245. kDETAddNewItem                    EQU        26554                ; Add new sublist item 
  246. kDETRemoveSelectedItems            EQU        26555                ; Remove selected sublist items 
  247. ;  Property types are used to specify types of properties and conversions between types (zero and negative numbers
  248. ;   are reserved for Apple; developer code resources can use positive numbers): 
  249.  
  250. kDETPrTypeNumber                EQU        -1                    ; A number 
  251. kDETPrTypeString                EQU        -2                    ; A string 
  252. kDETPrTypeBinary                EQU        -3                    ; A binary block 
  253. ;  ************************************ Info-pages 
  254. ;  Info-pages include the following as well:
  255. ;
  256. ;     Type    Offset                        Description
  257. ;     ----    ------                        -----------
  258. ;    'deti'    0                            Identifies the type of resource; see below for details on the contents
  259. ;    'rstr'    kDETInfoPageName            Is the name of the view to use in the page selection pop-up
  260. ;    'rstr'    kDETInfoPageMainViewAspect    Is the name of the aspect to use with the main page view
  261. ;    'rstr'    kDETInfoPageMenuName        Is the name of the catalogs menu ("Catalogs" if not present)
  262. ;    'detm'    kDETInfoPageMenuEntries        Are menu entries to go in the Catalogs menu
  263. ;
  264. ;
  265.  
  266.  
  267. kDETInfoPageName                EQU        4
  268. kDETInfoPageMainViewAspect        EQU        5
  269. kDETInfoPageMenuName            EQU        6
  270. kDETInfoPageMenuEntries            EQU        7
  271.  
  272. ;  ************************************ Views 
  273. ;
  274. ;   Flags: 
  275.  
  276.  
  277. kDETNoFlags                        EQU        0                    ; Main view (non-sublist) field enabled 
  278. kDETEnabled                        EQU        $01
  279. ;  The following flags make sense for items in a sublist only 
  280.  
  281.                                                             ; Hilight view when entry is selected 
  282. kDETHilightIfSelected            EQU        $01
  283. ;  The following flags make sense for text views only 
  284.  
  285. kDETNumericOnly                    EQU        $08                    ; Only allow the user to enter digits 
  286. kDETMultiLine                    EQU        $10                    ; Allow multiple lines in view 
  287. kDETDynamicSize                    EQU        $0200                ; Don't draw box around text until user clicks in it, then auto-size it 
  288.                                                             ; Don't allow the user to enter colons (convert ":"s to "-"s) 
  289. kDETAllowNoColons                EQU        $0400
  290. ;  The following flags are used for pop-up menus only 
  291.  
  292.                                                             ; Automatically resize pop-up based on contents 
  293. kDETPopupDynamicSize            EQU        $0100
  294. ;  The following flags are used for EditPicture views only 
  295.  
  296.                                                             ; Scale picture to view bounds rather than cropping 
  297. kDETScaleToView                    EQU        $0100
  298. ;     Sizes for icons 
  299.  
  300. kDETLargeIcon                    EQU        0
  301. kDETSmallIcon                    EQU        1
  302. kDETMiniIcon                    EQU        2
  303. ;  Stolen from TextEdit.h 
  304.  
  305. kDETLeft                        EQU        0
  306. kDETCenter                        EQU        1
  307. kDETRight                        EQU        -1
  308. kDETForceLeft                    EQU        -2
  309. ;  Flags for use within Box view type attributes - these are distinct from the flags above 
  310.  
  311. kDETUnused                        EQU        0
  312. kDETBoxTakesContentClicks        EQU        $01
  313. kDETBoxIsRounded                EQU        $02
  314. kDETBoxIsGrayed                    EQU        $04
  315. kDETBoxIsInvisible                EQU        $08
  316. ;  The common font info 
  317.  
  318. kDETApplicationFont                EQU        1
  319. kDETApplicationFontSize            EQU        9
  320. kDETAppFontLineHeight            EQU        12
  321. kDETSystemFont                    EQU        0
  322. kDETSystemFontSize                EQU        12
  323. kDETSystemFontLineHeight        EQU        16
  324. kDETDefaultFont                    EQU        1
  325. kDETDefaultFontSize                EQU        9
  326. kDETDefaultFontLineHeight        EQU        12
  327. ;     These were taken from QuickDraw.h (where they're enums and therefore unusable in resource definitions): 
  328.  
  329. kDETNormal                        EQU        0
  330. kDETBold                        EQU        1
  331. kDETItalic                        EQU        2
  332. kDETUnderline                    EQU        4
  333. kDETOutline                        EQU        8
  334. kDETShadow                        EQU        $10
  335. kDETCondense                    EQU        $20
  336. kDETExtend                        EQU        $40
  337.  
  338. kDETIconStyle                    EQU        -3                    ; Normal text style for regular sublist entries, italic text style for aliases 
  339. ;  View menu: 
  340.  
  341. kDETChangeViewCommand            EQU        'view'                ; Change the view; used especially in StaticCommandTextFromView sublist headers 
  342. ;  Info-page window sizes: 
  343. ;  Default record info-pages: 
  344.  
  345. kDETRecordInfoWindHeight        EQU        228
  346. kDETRecordInfoWindWidth            EQU        400
  347. ;  Default attribute info-pages: 
  348.  
  349. kDETAttributeInfoWindHeight        EQU        250
  350. kDETAttributeInfoWindWidth        EQU        230
  351. ;  Page identifying icon (for default info-page layout): 
  352.  
  353. kDETSubpageIconTop                EQU        8
  354. kDETSubpageIconLeft                EQU        8
  355. kDETSubpageIconBottom            EQU        40
  356. kDETSubpageIconRight            EQU        40
  357. ;  ************************************ Killers 
  358. ;
  359. ;   Killers include the following as well:
  360. ;
  361. ;     Type    Offset                        Description
  362. ;     ----    ------                        -----------
  363. ;    'detk'    0                            Identifies the type of resource; see below for details on the contents
  364. ;    'rst#'    kDETKillerName                Contains a list of template names to be killed
  365. ;
  366. ;
  367.  
  368.  
  369. kDETKillerName                    EQU        1
  370. ;  ************************************ Forwarders 
  371. ;
  372. ;   Forwarders include the following as well:
  373. ;
  374. ;     Type    Offset                        Description
  375. ;     ----    ------                        -----------
  376. ;    'detf'    0                            Identifies the type of resource; see below for details on the contents
  377. ;    'rst#'    kDETForwarderTemplateNames    Contains a list of names of templates to forward to
  378. ;
  379. ;
  380.  
  381.  
  382. kDETForwarderTemplateNames        EQU        4
  383. ; **********************************************************************************
  384. ; ********************************* Code Resources: ********************************
  385. ; **********************************************************************************
  386. ;  Target specification: 
  387.  
  388. kDETSelf                        EQU        0                    ; The "current" item 
  389. kDETSelfOtherAspect                EQU        1                    ; Another aspect of the current item 
  390. kDETParent                        EQU        2                    ; The parent (i.e., the aspect we're in the sublist of, if any) of the current item 
  391. kDETSublistItem                    EQU        3                    ; The itemNumberth item in the sublist 
  392. kDETSelectedSublistItem            EQU        4                    ; The itemNumberth selected item in the sublist 
  393. kDETDSSpec                        EQU        5                    ; The item specified by the packed DSSpec 
  394. kDETAspectTemplate                EQU        6                    ; A specific aspect template (number itemNumber) 
  395. kDETInfoPageTemplate            EQU        7                    ; A specific info-page template (number itemNumber) * Force type to be short 
  396. kDETHighSelector                EQU        $F000
  397. ; typedef long                             DETTargetSelector
  398.  
  399. DETTargetSpecification    RECORD 0
  400. selector                 ds.l    1                ; offset: $0 (0)        ;  Target selection method (see above) 
  401. aspectName                 ds.l    1                ; offset: $4 (4)        ;  The name of the aspect (kDETSelfOtherAspect, kDETSublistItem,
  402. ;    kDETSelectedSublistItem, kDETDSSpec); nil for main aspect or none; 
  403. ;   always filled in for calls if there is an aspect, even if it's the main aspect 
  404. itemNumber                 ds.l    1                ; offset: $8 (8)        ;  Sublist index (kDETSublistItem & kDETSelectedSublistItem & kDETAspectTemplate);
  405. ;    1-based indexing 
  406. dsSpec                     ds.l    1                ; offset: $C (12)        ;  DSSpec (kDETDSSpec only) 
  407. sizeof                     EQU *                    ; size:   $10 (16)
  408.                         ENDR
  409. ;  Code resource calls and call-backs both return an OSType:
  410. ;        kDETDidNotHandle (1)    = used by template to say "I didn't handle it" (for calls only)
  411. ;        noErr                    = function completed successfully
  412. ;        any error                = function failed, and here's why
  413. ;
  414.  
  415. ;  Call-back functions:
  416. ;
  417. ;        reqFunction                            Action
  418. ;        -----------                            ------
  419. ;        kDETcmdBeep                            Call SysBeep; useful for testing that a code resource's calls/call-backs are working at all
  420. ;
  421. ;        kDETcmdBusy                            Put up watch cursor and switch processes; user events elicit a beep
  422. ;
  423. ;        kDETcmdChangeCallFors                Change call-fors mask
  424. ;
  425. ;        kDETcmdGetCommandSelectionCount        Get the command selection count (for calls which have a command selection list)
  426. ;        kDETcmdGetCommandItemN                Get command selection item n (for calls which have a command selection list)
  427. ;
  428. ;        kDETcmdOpenDSSpec                    PackedDSSpec open (can also be done via AppleEvents -- this is a short-cut)
  429. ;
  430. ;        kDETcmdAboutToTalk                    About to talk to user: bring us to front, disable watch cursor, etc.
  431. ;
  432. ;        kDETcmdUnloadTemplates                Flush templates
  433. ;
  434. ;        kDETcmdTemplateCounts                Return number of aspect and info-page templates in system
  435. ;
  436. ;        kDETcmdGetDSSpec                    Get the PackedDSSpec for this object
  437. ;
  438. ;        kDETcmdSublistCount                    Return the count of the sublist items
  439. ;        kDETcmdSelectedSublistCount            Return the count of the selected sublist items
  440. ;
  441. ;        kDETcmdRequestSync                    Request a sync-up of the aspect with the catalog
  442. ;
  443. ;        kDETcmdBreakAttribute                Break an attribute -- apply all applicable patterns to an attribute to generate properties
  444. ;
  445. ;        kDETcmdGetTemplateFSSpec            Get the FSSpec of the file containing the template
  446. ;
  447. ;        kDETcmdGetOpenEdit                    Return the property of the view being edited (or kDETNoProperty if none)
  448. ;        kDETcmdCloseEdit                    Close the current edit
  449. ;
  450. ;        kDETcmdGetPropertyType                Get a property type
  451. ;
  452. ;        kDETcmdGetPropertyNumber            Get a property, number format
  453. ;        kDETcmdGetPropertyRString            Get a property, RString format
  454. ;        kDETcmdGetPropertyBinarySize        Get a property, binary, return size
  455. ;        kDETcmdGetPropertyBinary            Get a property, binary format
  456. ;
  457. ;        kDETcmdGetPropertyChanged            Get a property changed flag
  458. ;        kDETcmdGetPropertyEditable            Get a property editable flag
  459. ;
  460. ;        kDETcmdSetPropertyType                Set a property type
  461. ;
  462. ;        kDETcmdSetPropertyNumber            Set a property, number format
  463. ;        kDETcmdSetPropertyRString            Set a property, RString format
  464. ;        kDETcmdSetPropertyBinary            Set a property, binary data & size
  465. ;
  466. ;        kDETcmdSetPropertyChanged            Set a property changed flag
  467. ;        kDETcmdSetPropertyEditable            Set a property editable flag
  468. ;
  469. ;        kDETcmdDirtyProperty                Dirty a property (notify other code resources of change)
  470. ;
  471. ;        kDETcmdDoPropertyCommand            Issue a property command
  472. ;
  473. ;        kDETcmdAddMenu                        Add to the end of a dynamic menu
  474. ;        kDETcmdRemoveMenu                    Remove a dynamic menu item
  475. ;        kDETcmdMenuItemRString                Get a dynamic menu item RString
  476. ;
  477. ;        kDETcmdSaveProperty                    Force a save of a property -- apply all applicable patterns to write out the property
  478. ;
  479. ;        kDETcmdGetCustomViewUserReference    Get custom view user reference (as given in .r file)
  480. ;        kDETcmdGetCustomViewBounds            Get custom view current bounds
  481. ;
  482. ;        kDETcmdGetResource                    Get a resource from a template
  483. ;
  484.  
  485.  
  486.  
  487. kDETcmdSimpleCallback            EQU        0
  488. kDETcmdBeep                        EQU        1
  489. kDETcmdBusy                        EQU        2
  490. kDETcmdChangeCallFors            EQU        3
  491. kDETcmdGetCommandSelectionCount    EQU        4
  492. kDETcmdGetCommandItemN            EQU        5
  493. kDETcmdOpenDSSpec                EQU        6
  494. kDETcmdAboutToTalk                EQU        7
  495. kDETcmdUnloadTemplates            EQU        8
  496. kDETcmdTemplateCounts            EQU        9
  497. kDETcmdTargetedCallback            EQU        1000
  498. kDETcmdGetDSSpec                EQU        1001
  499. kDETcmdSublistCount                EQU        1002
  500. kDETcmdSelectedSublistCount        EQU        1003
  501. kDETcmdRequestSync                EQU        1004
  502. kDETcmdBreakAttribute            EQU        1005
  503. kDETcmdGetTemplateFSSpec        EQU        1006
  504. kDETcmdGetOpenEdit                EQU        1007
  505. kDETcmdCloseEdit                EQU        1008
  506. kDETcmdPropertyCallback            EQU        2000
  507. kDETcmdGetPropertyType            EQU        2001
  508. kDETcmdGetPropertyNumber        EQU        2002
  509. kDETcmdGetPropertyRString        EQU        2003
  510. kDETcmdGetPropertyBinarySize    EQU        2004
  511. kDETcmdGetPropertyBinary        EQU        2005
  512. kDETcmdGetPropertyChanged        EQU        2006
  513. kDETcmdGetPropertyEditable        EQU        2007
  514. kDETcmdSetPropertyType            EQU        2008
  515. kDETcmdSetPropertyNumber        EQU        2009
  516. kDETcmdSetPropertyRString        EQU        2010
  517. kDETcmdSetPropertyBinary        EQU        2011
  518. kDETcmdSetPropertyChanged        EQU        2012
  519. kDETcmdSetPropertyEditable        EQU        2013
  520. kDETcmdDirtyProperty            EQU        2014
  521. kDETcmdDoPropertyCommand        EQU        2015
  522. kDETcmdAddMenu                    EQU        2016
  523. kDETcmdRemoveMenu                EQU        2017
  524. kDETcmdMenuItemRString            EQU        2018
  525. kDETcmdSaveProperty                EQU        2019
  526. kDETcmdGetCustomViewUserReference EQU    2020
  527. kDETcmdGetCustomViewBounds        EQU        2021
  528. kDETcmdGetResource                EQU        2022                ; Force type to be long 
  529. kDETcmdHighCallback                EQU        $F0000000
  530. ; typedef unsigned long                 DETCallBackFunctions
  531.  
  532. ;  Call functions:
  533. ;
  534. ;        reqFunction                        Action
  535. ;        -----------                        ------
  536. ;        kDETcmdInit                        Called once when template is first loaded (good time to allocate private data); returns call-for list
  537. ;        kDETcmdExit                        Called once when template is freed (good time to free private data)
  538. ;
  539. ;        kDETcmdAttributeCreation        New sublist attribute creation about to occur; this gives the template a chance to modify
  540. ;                                        the value that's about to be created; sent to the template that will be used for
  541. ;                                        the main aspect of the new entry
  542. ;
  543. ;        kDETcmdDynamicForwarders        Return a list of dynamically created forwarders
  544. ;
  545. ;        kDETcmdInstanceInit                Called once when instance of template is started (good time to allocate private instance data)
  546. ;        kDETcmdInstanceExit                Called once when instance is ended (good time to free private instance data)
  547. ;
  548. ;        kDETcmdIdle                        Called periodically during idle times
  549. ;
  550. ;        kDETcmdViewListChanged            Called when the info-page view-list (list of enabled views) has changed
  551. ;
  552. ;        kDETcmdValidateSave                Validate save: about to save info-page, return noErr (or kDETDidNotHandle) if it's OK to do so
  553. ;
  554. ;        kDETcmdDropQuery                Drop query: return the appropriate operation for this drag; ask destination
  555. ;        kDETcmdDropMeQuery                Drop query: return the appropriate operation for this drag; ask dropee
  556. ;
  557. ;        kDETcmdAttributeNew                Attribute value new (return kDETDidNotHandle to let normal new processing occur)
  558. ;        kDETcmdAttributeChange            Attribute value change (return kDETDidNotHandle to let normal change processing occur)
  559. ;        kDETcmdAttributeDelete            Attribute value delete (return kDETDidNotHandle to let normal deletion occur); sent to the
  560. ;                                        main aspect of the attribute that's about to be deleted
  561. ;        kDETcmdItemNew                    Target item (record or attribute) has just been created
  562. ;
  563. ;        kDETcmdOpenSelf                    Self open (return noErr to prevent opening; return kDETDidNotHandle to allow it)
  564. ;
  565. ;        kDETcmdDynamicResource            Return a dynamically created resource
  566. ;
  567. ;        kDETcmdShouldSync                Check if the code resource wants to force a sync (update data from catalog)
  568. ;        kDETcmdDoSync                    Give code resource a chance to sync (read in and break all attributes)
  569. ;
  570. ;        kDETcmdPropertyCommand            Command received in the property number range (usually means a button's been pushed)
  571. ;
  572. ;        kDETcmdMaximumTextLength        Return maximum size for text form of property
  573. ;
  574. ;        kDETcmdPropertyDirtied            Property dirtied, need to redraw
  575. ;
  576. ;        kDETcmdPatternIn                Custom pattern element encountered on reading in an attribute
  577. ;        kDETcmdPatternOut                Custom pattern element encountered on writing out an attribute
  578. ;
  579. ;        kDETcmdConvertToNumber            Convert from template-defined property type to number
  580. ;        kDETcmdConvertToRString            Convert from template-defined property type to RString
  581. ;        kDETcmdConvertFromNumber        Convert from number to template-defined property type
  582. ;        kDETcmdConvertFromRString        Convert from RString to template-defined property type
  583. ;
  584. ;        kDETcmdCustomViewDraw            Custom view draw
  585. ;        kDETcmdCustomViewMouseDown        Custom view mouse down
  586. ;
  587. ;        kDETcmdKeyPress                    Key press (used primarily to filter entry into EditText views)
  588. ;        kDETcmdPaste                    Paste (used primarily to filter entry into EditText views)
  589. ;
  590. ;        kDETcmdCustomMenuSelected        Custom Catalogs menu selected
  591. ;        kDETcmdCustomMenuEnabled        Return whether custom Catalogs menu entry should be enabled
  592. ;
  593.  
  594.  
  595.  
  596. kDETcmdSimpleCall                EQU        0
  597. kDETcmdInit                        EQU        1
  598. kDETcmdExit                        EQU        2
  599. kDETcmdAttributeCreation        EQU        3
  600. kDETcmdDynamicForwarders        EQU        4
  601. kDETcmdTargetedCall                EQU        1000
  602. kDETcmdInstanceInit                EQU        1001
  603. kDETcmdInstanceExit                EQU        1002
  604. kDETcmdIdle                        EQU        1003
  605. kDETcmdViewListChanged            EQU        1004
  606. kDETcmdValidateSave                EQU        1005
  607. kDETcmdDropQuery                EQU        1006
  608. kDETcmdDropMeQuery                EQU        1007
  609. kDETcmdAttributeNew                EQU        1008
  610. kDETcmdAttributeChange            EQU        1009
  611. kDETcmdAttributeDelete            EQU        1010
  612. kDETcmdItemNew                    EQU        1011
  613. kDETcmdOpenSelf                    EQU        1012
  614. kDETcmdDynamicResource            EQU        1013
  615. kDETcmdShouldSync                EQU        1014
  616. kDETcmdDoSync                    EQU        1015
  617. kDETcmdPropertyCall                EQU        2000
  618. kDETcmdPropertyCommand            EQU        2001
  619. kDETcmdMaximumTextLength        EQU        2002
  620. kDETcmdPropertyDirtied            EQU        2003
  621. kDETcmdPatternIn                EQU        2004
  622. kDETcmdPatternOut                EQU        2005
  623. kDETcmdConvertToNumber            EQU        2006
  624. kDETcmdConvertToRString            EQU        2007
  625. kDETcmdConvertFromNumber        EQU        2008
  626. kDETcmdConvertFromRString        EQU        2009
  627. kDETcmdCustomViewDraw            EQU        2010
  628. kDETcmdCustomViewMouseDown        EQU        2011
  629. kDETcmdKeyPress                    EQU        2012
  630. kDETcmdPaste                    EQU        2013
  631. kDETcmdCustomMenuSelected        EQU        2014
  632. kDETcmdCustomMenuEnabled        EQU        2015
  633. kDETcmdHighCall                    EQU        $F0000000            ; Force the type to be long 
  634. ; typedef unsigned long                 DETCallFunctions
  635.  
  636. ;  Valid commandIDs for DETDropQueryBlock and DETDropMeQueryBlock (in addition to property numbers): 
  637.  
  638. kDETDoNothing                    EQU        'xxx0'
  639. kDETMove                        EQU        'move'
  640. kDETDrag                        EQU        'drag'
  641. kDETAlias                        EQU        'alis'
  642.  
  643. DETProtoCallBackBlock    RECORD 0
  644. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  645. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  646. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  647. sizeof                     EQU *                    ; size:   $16 (22)
  648.                         ENDR
  649. DETBeepBlock            RECORD 0
  650. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  651. sizeof                     EQU *                    ; size:   $4 (4)
  652.                         ENDR
  653. DETBusyBlock            RECORD 0
  654. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  655. sizeof                     EQU *                    ; size:   $4 (4)
  656.                         ENDR
  657. DETChangeCallForsBlock    RECORD 0
  658. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  659. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  660. newCallFors                 ds.l    1                ; offset: $14 (20)        ;   -> New call-for mask 
  661. sizeof                     EQU *                    ; size:   $18 (24)
  662.                         ENDR
  663. DETGetCommandSelectionCountBlock RECORD 0
  664. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  665. count                     ds.l    1                ; offset: $4 (4)        ;  <-  The number of items in the command selection list 
  666. sizeof                     EQU *                    ; size:   $8 (8)
  667.                         ENDR
  668.  
  669. kDETHFSType                        EQU        0                    ; HFS item type 
  670. kDETDSType                        EQU        1                    ; Catalog Service item type 
  671. kDETMailType                    EQU        2                    ; Mail (letter) item type 
  672. kDETMoverType                    EQU        3                    ; Sounds, fonts, etc., from inside a suitcase or system file 
  673. kDETLastItemType                EQU        $F0000000            ; Force it to be a long (C & C++ seem to disagree about the definition of 0xF000) 
  674. ; typedef unsigned long                 DETItemType
  675.  
  676. ;  FSSpec plus possibly interesting additional info 
  677. DETFSInfo                RECORD 0
  678. fileType                 ds.l    1                ; offset: $0 (0)        ;  File type 
  679. fileCreator                 ds.l    1                ; offset: $4 (4)        ;  File creator 
  680. fdFlags                     ds.w    1                ; offset: $8 (8)        ;  Finder flags 
  681. fsSpec                     ds        FSSpec            ; offset: $A (10)        ;  FSSpec 
  682. sizeof                     EQU *                    ; size:   $50 (80)
  683.                         ENDR
  684. DSRec                    RECORD 0
  685. dsSpec                     ds.l    1                ; offset: $0 (0)        ;  <-  DSSpec for item (caller must DisposHandle() when done) 
  686. refNum                     ds.w    1                ; offset: $4 (4)        ;  <-  Refnum for returned address 
  687. identity                 ds.l    1                ; offset: $6 (6)        ;  <-  Identity for returned address 
  688. sizeof                     EQU *                    ; size:   $A (10)
  689.                         ENDR
  690. ItemRec                    RECORD 0
  691. fsInfo                     ds.l    1                ; offset: $0 (0)        ;  <-  FSSpec & info for item (caller must DisposHandle() when done) 
  692.                          ORG 0
  693. ds                         ds        DSRec            ; offset: $0 (0)
  694.                          ORG 0
  695. dsSpec                     ds.l    1                ; offset: $0 (0)        ;  <-  DSSpec for item (caller must DisposHandle() when done) 
  696.                          ORG 0
  697. ltrSpec                     ds.l    1                ; offset: $0 (0)        ;  <-  Letter spec for item (caller must DisposHandle() when done) 
  698.                          ORG 10
  699. sizeof                     EQU *                    ; size:   $A (10)
  700.                         ENDR
  701. DETGetCommandItemNBlock    RECORD 0
  702. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  703. itemNumber                 ds.l    1                ; offset: $4 (4)        ;   -> Item number to retrieve (1-based) 
  704. itemType                 ds.l    1                ; offset: $8 (8)        ;   -> Type of item to be returned (if we can interpret it as such) 
  705. item                     ds        ItemRec            ; offset: $C (12)
  706. sizeof                     EQU *                    ; size:   $16 (22)
  707.                         ENDR
  708. DETGetDSSpecBlock        RECORD 0
  709. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  710. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  711. dsSpec                     ds.l    1                ; offset: $14 (20)        ;  <-  Handle with result (caller must DisposHandle() when done) 
  712. refNum                     ds.w    1                ; offset: $18 (24)        ;  <-  Refnum for address if PD 
  713. identity                 ds.l    1                ; offset: $1A (26)        ;  <-  Identity for address 
  714. isAlias                     ds.b    1                ; offset: $1E (30)        ;  <-  True if this entry is an alias 
  715. isRecordRef                 ds.b    1                ; offset: $1F (31)        ;  <-  True if this entry is a record reference (reserved) 
  716. sizeof                     EQU *                    ; size:   $20 (32)
  717.                         ENDR
  718. DETGetTemplateFSSpecBlock RECORD 0
  719. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  720. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  721. fsSpec                     ds        FSSpec            ; offset: $14 (20)        ;  <-  FSSpec of template file 
  722. baseID                     ds.w    1                ; offset: $5A (90)        ;  <-  Base ID of this template 
  723. aspectTemplateNumber     ds.l    1                ; offset: $5C (92)        ;  <-  The template number for this aspect template 
  724. sizeof                     EQU *                    ; size:   $60 (96)
  725.                         ENDR
  726. DETGetOpenEditBlock        RECORD 0
  727. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  728. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  729. viewProperty             ds.w    1                ; offset: $14 (20)        ;  <-  The property of the view being edited (or kNoProperty if none) 
  730. sizeof                     EQU *                    ; size:   $16 (22)
  731.                         ENDR
  732. DETCloseEditBlock        RECORD 0
  733. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  734. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  735. sizeof                     EQU *                    ; size:   $14 (20)
  736.                         ENDR
  737. DETGetPropertyTypeBlock    RECORD 0
  738. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  739. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  740. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  741. propertyType             ds.w    1                ; offset: $16 (22)        ;  <-  The type of the property 
  742. sizeof                     EQU *                    ; size:   $18 (24)
  743.                         ENDR
  744. DETGetPropertyNumberBlock RECORD 0
  745. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  746. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  747. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  748. propertyValue             ds.l    1                ; offset: $16 (22)        ;  <-  The value of the property 
  749. sizeof                     EQU *                    ; size:   $1A (26)
  750.                         ENDR
  751. DETGetPropertyRStringBlock RECORD 0
  752. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  753. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  754. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  755. propertyValue             ds.l    1                ; offset: $16 (22)        ;  <-  A handle containing the property (as an RString) (caller must DisposHandle() when done) 
  756. sizeof                     EQU *                    ; size:   $1A (26)
  757.                         ENDR
  758. DETGetPropertyBinarySizeBlock RECORD 0
  759. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  760. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  761. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  762. propertyBinarySize         ds.l    1                ; offset: $16 (22)        ;  <-  The size of the property as a binary block 
  763. sizeof                     EQU *                    ; size:   $1A (26)
  764.                         ENDR
  765. DETGetPropertyBinaryBlock RECORD 0
  766. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  767. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  768. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  769. propertyValue             ds.l    1                ; offset: $16 (22)        ;  <-  Handle with the value of the property (caller must DisposHandle() when done) 
  770. sizeof                     EQU *                    ; size:   $1A (26)
  771.                         ENDR
  772. DETGetPropertyChangedBlock RECORD 0
  773. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  774. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  775. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  776. propertyChanged             ds.b    1                ; offset: $16 (22)        ;  <-  True if the property is marked as changed 
  777. filler1                     ds.b    1                ; offset: $17 (23)
  778. sizeof                     EQU *                    ; size:   $18 (24)
  779.                         ENDR
  780. DETGetPropertyEditableBlock RECORD 0
  781. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  782. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  783. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  784. propertyEditable         ds.b    1                ; offset: $16 (22)        ;  <-  True if the property can be edited by the user (if false, view will appear disabled) 
  785. filler1                     ds.b    1                ; offset: $17 (23)
  786. sizeof                     EQU *                    ; size:   $18 (24)
  787.                         ENDR
  788. DETSetPropertyTypeBlock    RECORD 0
  789. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  790. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  791. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  792. newType                     ds.w    1                ; offset: $16 (22)        ;   -> New type for property (just sets type, does not convert contents) 
  793. sizeof                     EQU *                    ; size:   $18 (24)
  794.                         ENDR
  795. DETSetPropertyNumberBlock RECORD 0
  796. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  797. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  798. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  799. newValue                 ds.l    1                ; offset: $16 (22)        ;   -> New value to set property to (and set type to number) 
  800. sizeof                     EQU *                    ; size:   $1A (26)
  801.                         ENDR
  802. DETSetPropertyRStringBlock RECORD 0
  803. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  804. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  805. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  806. newValue                 ds.l    1                ; offset: $16 (22)        ;   -> New value to set property to (and set type to RString) 
  807. sizeof                     EQU *                    ; size:   $1A (26)
  808.                         ENDR
  809. DETSetPropertyBinaryBlock RECORD 0
  810. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  811. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  812. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  813. newValue                 ds.l    1                ; offset: $16 (22)        ;   -> New value to set property to (and set type to binary) 
  814. newValueSize             ds.l    1                ; offset: $1A (26)        ;   -> Size of new value 
  815. sizeof                     EQU *                    ; size:   $1E (30)
  816.                         ENDR
  817. DETSetPropertyChangedBlock RECORD 0
  818. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  819. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  820. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  821. propertyChanged             ds.b    1                ; offset: $16 (22)        ;   -> Value to set changed flag on property to 
  822. filler1                     ds.b    1                ; offset: $17 (23)
  823. sizeof                     EQU *                    ; size:   $18 (24)
  824.                         ENDR
  825. DETSetPropertyEditableBlock RECORD 0
  826. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  827. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  828. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  829. propertyEditable         ds.b    1                ; offset: $16 (22)        ;   -> Value to set editable flag on property to 
  830. filler1                     ds.b    1                ; offset: $17 (23)
  831. sizeof                     EQU *                    ; size:   $18 (24)
  832.                         ENDR
  833. DETDirtyPropertyBlock    RECORD 0
  834. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  835. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  836. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  837. sizeof                     EQU *                    ; size:   $16 (22)
  838.                         ENDR
  839. DETDoPropertyCommandBlock RECORD 0
  840. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  841. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  842. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  843. parameter                 ds.l    1                ; offset: $16 (22)        ;  ->  Parameter of command 
  844. sizeof                     EQU *                    ; size:   $1A (26)
  845.                         ENDR
  846. DETSublistCountBlock    RECORD 0
  847. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  848. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  849. count                     ds.l    1                ; offset: $14 (20)        ;  <-  The number of items in the current item's sublist 
  850. sizeof                     EQU *                    ; size:   $18 (24)
  851.                         ENDR
  852. DETSelectedSublistCountBlock RECORD 0
  853. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  854. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  855. count                     ds.l    1                ; offset: $14 (20)        ;  <-  The number of selected items in the current item's sublist 
  856. sizeof                     EQU *                    ; size:   $18 (24)
  857.                         ENDR
  858. DETRequestSyncBlock        RECORD 0
  859. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  860. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  861. sizeof                     EQU *                    ; size:   $14 (20)
  862.                         ENDR
  863. DETAddMenuBlock            RECORD 0
  864. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  865. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  866. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  867. name                     ds.l    1                ; offset: $16 (22)        ;   -> Name of new menu item 
  868. parameter                 ds.l    1                ; offset: $1A (26)        ;   -> Parameter to return when this item is selected 
  869. addAfter                 ds.l    1                ; offset: $1E (30)        ;   -> Parameter of entry to add after, or -1 for add at end 
  870. sizeof                     EQU *                    ; size:   $22 (34)
  871.                         ENDR
  872. DETRemoveMenuBlock        RECORD 0
  873. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  874. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  875. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  876. itemToRemove             ds.l    1                ; offset: $16 (22)        ;   -> Parameter of menu item to remove 
  877. sizeof                     EQU *                    ; size:   $1A (26)
  878.                         ENDR
  879. DETMenuItemRStringBlock    RECORD 0
  880. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  881. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  882. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  883. itemParameter             ds.l    1                ; offset: $16 (22)        ;   -> Parameter of menu item to return string for 
  884. rString                     ds.l    1                ; offset: $1A (26)        ;  <-  Handle with the RString (caller must DisposHandle() when done) 
  885. sizeof                     EQU *                    ; size:   $1E (30)
  886.                         ENDR
  887. DETOpenDSSpecBlock        RECORD 0
  888. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  889. dsSpec                     ds.l    1                ; offset: $4 (4)        ;   -> DSSpec of object to be opened 
  890. sizeof                     EQU *                    ; size:   $8 (8)
  891.                         ENDR
  892. DETAboutToTalkBlock        RECORD 0
  893. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  894. sizeof                     EQU *                    ; size:   $4 (4)
  895.                         ENDR
  896. DETBreakAttributeBlock    RECORD 0
  897. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  898. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  899. breakAttribute             ds.l    1                ; offset: $14 (20)        ;   -> Attribute to parse 
  900. isChangeable             ds.b    1                ; offset: $18 (24)        ;   -> True if the value can be changed by the user 
  901. filler1                     ds.b    1                ; offset: $19 (25)
  902. sizeof                     EQU *                    ; size:   $1A (26)
  903.                         ENDR
  904. DETSavePropertyBlock    RECORD 0
  905. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  906. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  907. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  908. sizeof                     EQU *                    ; size:   $16 (22)
  909.                         ENDR
  910. DETGetCustomViewUserReferenceBlock RECORD 0
  911. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  912. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  913. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  914. userReference             ds.w    1                ; offset: $16 (22)        ;  <-  User reference value, as specified in the .r file 
  915. sizeof                     EQU *                    ; size:   $18 (24)
  916.                         ENDR
  917. DETGetCustomViewBoundsBlock RECORD 0
  918. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  919. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  920. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  921. bounds                     ds        Rect            ; offset: $16 (22)        ;  <-  Bounds of the view 
  922. sizeof                     EQU *                    ; size:   $1E (30)
  923.                         ENDR
  924. DETGetResourceBlock        RECORD 0
  925. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  926. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  927. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  928. resourceType             ds.l    1                ; offset: $16 (22)        ;   -> Resource type 
  929. theResource                 ds.l    1                ; offset: $1A (26)        ;  <-  The resource handle (caller must dispose when done) 
  930. sizeof                     EQU *                    ; size:   $1E (30)
  931.                         ENDR
  932. DETTemplateCounts        RECORD 0
  933. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  934. aspectTemplateCount         ds.l    1                ; offset: $4 (4)        ;  <-  Number of aspect templates in the system 
  935. infoPageTemplateCount     ds.l    1                ; offset: $8 (8)        ;  <-  Number of info-page templates in the system 
  936. sizeof                     EQU *                    ; size:   $C (12)
  937.                         ENDR
  938. DETUnloadTemplatesBlock    RECORD 0
  939. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  940. sizeof                     EQU *                    ; size:   $4 (4)
  941.                         ENDR
  942.  
  943. DETCallBackBlock        RECORD 0
  944. protoCallBack             ds        DETProtoCallBackBlock ; offset: $0 (0)
  945.                          ORG 0
  946. beep                     ds        DETBeepBlock    ; offset: $0 (0)
  947.                          ORG 0
  948. busy                     ds        DETBusyBlock    ; offset: $0 (0)
  949.                          ORG 0
  950. changeCallFors             ds        DETChangeCallForsBlock ; offset: $0 (0)
  951.                          ORG 0
  952. getCommandSelectionCount  ds    DETGetCommandSelectionCountBlock ; offset: $0 (0)
  953.                          ORG 0
  954. getCommandItemN             ds        DETGetCommandItemNBlock ; offset: $0 (0)
  955.                          ORG 0
  956. getDSSpec                 ds        DETGetDSSpecBlock ; offset: $0 (0)
  957.                          ORG 0
  958. getTemplateFSSpec         ds        DETGetTemplateFSSpecBlock ; offset: $0 (0)
  959.                          ORG 0
  960. getOpenEdit                 ds        DETGetOpenEditBlock ; offset: $0 (0)
  961.                          ORG 0
  962. closeEdit                 ds        DETCloseEditBlock ; offset: $0 (0)
  963.                          ORG 0
  964. getPropertyType             ds        DETGetPropertyTypeBlock ; offset: $0 (0)
  965.                          ORG 0
  966. getPropertyNumber         ds        DETGetPropertyNumberBlock ; offset: $0 (0)
  967.                          ORG 0
  968. getPropertyRString         ds        DETGetPropertyRStringBlock ; offset: $0 (0)
  969.                          ORG 0
  970. getPropertyBinarySize     ds        DETGetPropertyBinarySizeBlock ; offset: $0 (0)
  971.                          ORG 0
  972. getPropertyBinary         ds        DETGetPropertyBinaryBlock ; offset: $0 (0)
  973.                          ORG 0
  974. getPropertyChanged         ds        DETGetPropertyChangedBlock ; offset: $0 (0)
  975.                          ORG 0
  976. getPropertyEditable         ds        DETGetPropertyEditableBlock ; offset: $0 (0)
  977.                          ORG 0
  978. setPropertyType             ds        DETSetPropertyTypeBlock ; offset: $0 (0)
  979.                          ORG 0
  980. setPropertyNumber         ds        DETSetPropertyNumberBlock ; offset: $0 (0)
  981.                          ORG 0
  982. setPropertyRString         ds        DETSetPropertyRStringBlock ; offset: $0 (0)
  983.                          ORG 0
  984. setPropertyBinary         ds        DETSetPropertyBinaryBlock ; offset: $0 (0)
  985.                          ORG 0
  986. setPropertyChanged         ds        DETSetPropertyChangedBlock ; offset: $0 (0)
  987.                          ORG 0
  988. setPropertyEditable         ds        DETSetPropertyEditableBlock ; offset: $0 (0)
  989.                          ORG 0
  990. dirtyProperty             ds        DETDirtyPropertyBlock ; offset: $0 (0)
  991.                          ORG 0
  992. doPropertyCommand         ds        DETDoPropertyCommandBlock ; offset: $0 (0)
  993.                          ORG 0
  994. sublistCount             ds        DETSublistCountBlock ; offset: $0 (0)
  995.                          ORG 0
  996. selectedSublistCount     ds        DETSelectedSublistCountBlock ; offset: $0 (0)
  997.                          ORG 0
  998. requestSync                 ds        DETRequestSyncBlock ; offset: $0 (0)
  999.                          ORG 0
  1000. addMenu                     ds        DETAddMenuBlock ; offset: $0 (0)
  1001.                          ORG 0
  1002. removeMenu                 ds        DETRemoveMenuBlock ; offset: $0 (0)
  1003.                          ORG 0
  1004. menuItemRString             ds        DETMenuItemRStringBlock ; offset: $0 (0)
  1005.                          ORG 0
  1006. openDSSpec                 ds        DETOpenDSSpecBlock ; offset: $0 (0)
  1007.                          ORG 0
  1008. aboutToTalk                 ds        DETAboutToTalkBlock ; offset: $0 (0)
  1009.                          ORG 0
  1010. breakAttribute             ds        DETBreakAttributeBlock ; offset: $0 (0)
  1011.                          ORG 0
  1012. saveProperty             ds        DETSavePropertyBlock ; offset: $0 (0)
  1013.                          ORG 0
  1014. getCustomViewUserReference  ds    DETGetCustomViewUserReferenceBlock ; offset: $0 (0)
  1015.                          ORG 0
  1016. getCustomViewBounds         ds        DETGetCustomViewBoundsBlock ; offset: $0 (0)
  1017.                          ORG 0
  1018. getResource                 ds        DETGetResourceBlock ; offset: $0 (0)
  1019.                          ORG 0
  1020. templateCounts             ds        DETTemplateCounts ; offset: $0 (0)
  1021.                          ORG 0
  1022. unloadTemplates             ds        DETUnloadTemplatesBlock ; offset: $0 (0)
  1023.                          ORG 96
  1024. sizeof                     EQU *                    ; size:   $60 (96)
  1025.                         ENDR
  1026. ; typedef union DETCallBackBlock *        DETCallBackBlockPtr
  1027.  
  1028.  
  1029.  
  1030. ; typedef DETCallBlock *                DETCallBlockPtr
  1031.  
  1032. ; typedef DETCallBackUPP                 DETCallBack
  1033.  
  1034. DETProtoCallBlock        RECORD 0
  1035. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1036. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1037. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1038. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1039. ;     common to all invocations of code resource) 
  1040. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1041. ;     code resource) 
  1042. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1043. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1044. filler1                     ds.b    1                ; offset: $25 (37)
  1045. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1046. sizeof                     EQU *                    ; size:   $28 (40)
  1047.                         ENDR
  1048. DETInitBlock            RECORD 0
  1049. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1050. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1051. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1052. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource) 
  1053. newCallFors                 ds.l    1                ; offset: $10 (16)        ;  <-  New call-for mask 
  1054. sizeof                     EQU *                    ; size:   $14 (20)
  1055.                         ENDR
  1056. DETExitBlock            RECORD 0
  1057. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1058. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1059. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1060. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource) 
  1061. sizeof                     EQU *                    ; size:   $10 (16)
  1062.                         ENDR
  1063. DETInstanceInitBlock    RECORD 0
  1064. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1065. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1066. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1067. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1068. ;     common to all invocations of code resource) 
  1069. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1070. ;     code resource) 
  1071. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1072. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1073. filler1                     ds.b    1                ; offset: $25 (37)
  1074. sizeof                     EQU *                    ; size:   $26 (38)
  1075.                         ENDR
  1076. DETInstanceExitBlock    RECORD 0
  1077. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1078. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1079. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1080. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1081. ;     common to all invocations of code resource) 
  1082. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1083. ;     code resource) 
  1084. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1085. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1086. filler1                     ds.b    1                ; offset: $25 (37)
  1087. sizeof                     EQU *                    ; size:   $26 (38)
  1088.                         ENDR
  1089. DETInstanceIdleBlock    RECORD 0
  1090. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1091. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1092. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1093. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1094. ;     common to all invocations of code resource) 
  1095. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1096. ;     code resource) 
  1097. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1098. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1099. filler1                     ds.b    1                ; offset: $25 (37)
  1100. sizeof                     EQU *                    ; size:   $26 (38)
  1101.                         ENDR
  1102. DETPropertyCommandBlock    RECORD 0
  1103. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1104. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1105. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1106. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1107. ;     common to all invocations of code resource) 
  1108. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1109. ;     code resource) 
  1110. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1111. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1112. filler1                     ds.b    1                ; offset: $25 (37)
  1113. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1114. parameter                 ds.l    1                ; offset: $28 (40)        ;   -> Parameter of command 
  1115. sizeof                     EQU *                    ; size:   $2C (44)
  1116.                         ENDR
  1117. DETMaximumTextLengthBlock RECORD 0
  1118. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1119. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1120. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1121. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1122. ;     common to all invocations of code resource) 
  1123. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1124. ;     code resource) 
  1125. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1126. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1127. filler1                     ds.b    1                ; offset: $25 (37)
  1128. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1129. maxSize                     ds.l    1                ; offset: $28 (40)        ;  <-  Return the maximum number of characters the user can entry when property is edited in an EditText 
  1130. sizeof                     EQU *                    ; size:   $2C (44)
  1131.                         ENDR
  1132. DETViewListChangedBlock    RECORD 0
  1133. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1134. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1135. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1136. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1137. ;     common to all invocations of code resource) 
  1138. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1139. ;     code resource) 
  1140. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1141. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1142. filler1                     ds.b    1                ; offset: $25 (37)
  1143. sizeof                     EQU *                    ; size:   $26 (38)
  1144.                         ENDR
  1145. DETPropertyDirtiedBlock    RECORD 0
  1146. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1147. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1148. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1149. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1150. ;     common to all invocations of code resource) 
  1151. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1152. ;     code resource) 
  1153. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1154. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1155. filler1                     ds.b    1                ; offset: $25 (37)
  1156. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1157. sizeof                     EQU *                    ; size:   $28 (40)
  1158.                         ENDR
  1159. DETValidateSaveBlock    RECORD 0
  1160. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1161. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1162. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1163. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1164. ;     common to all invocations of code resource) 
  1165. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1166. ;     code resource) 
  1167. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1168. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1169. filler1                     ds.b    1                ; offset: $25 (37)
  1170. errorString                 ds.l    1                ; offset: $26 (38)        ;  <-  Handle with error string if validation fails (callee must allocate handle, DE will DisposHandle() it) 
  1171. sizeof                     EQU *                    ; size:   $2A (42)
  1172.                         ENDR
  1173. DETDropQueryBlock        RECORD 0
  1174. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1175. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1176. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1177. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1178. ;     common to all invocations of code resource) 
  1179. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1180. ;     code resource) 
  1181. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1182. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1183. filler1                     ds.b    1                ; offset: $25 (37)
  1184. modifiers                 ds.w    1                ; offset: $26 (38)        ;   -> Modifiers at drop time (option/control/command/shift keys) 
  1185. commandID                 ds.l    1                ; offset: $28 (40)        ;  <-> Command ID (kDETDoNothing, kDETMove, kDETDrag (copy), kDETAlias, or a property number) 
  1186. destinationType             ds        AttributeType    ; offset: $2C (44)        ;  <-> Type to convert attribute to 
  1187. copyToHFS                 ds.b    1                ; offset: $50 (80)        ;  <-  If true, object should be copied to HFS before being operated on, and deleted after 
  1188. filler2                     ds.b    1                ; offset: $51 (81)
  1189. sizeof                     EQU *                    ; size:   $52 (82)
  1190.                         ENDR
  1191. DETDropMeQueryBlock        RECORD 0
  1192. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1193. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1194. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1195. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1196. ;     common to all invocations of code resource) 
  1197. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1198. ;     code resource) 
  1199. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1200. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1201. filler1                     ds.b    1                ; offset: $25 (37)
  1202. modifiers                 ds.w    1                ; offset: $26 (38)        ;   -> Modifiers at drop time (option/control/command/shift keys) 
  1203. commandID                 ds.l    1                ; offset: $28 (40)        ;  <-> Command ID (kDETDoNothing, kDETMove, kDETDrag (copy), kDETAlias, or a property number) 
  1204. destinationType             ds        AttributeType    ; offset: $2C (44)        ;  <-> Type to convert attribute to 
  1205. copyToHFS                 ds.b    1                ; offset: $50 (80)        ;  <-  If true, object should be copied to HFS before being operated on, and deleted after 
  1206. filler2                     ds.b    1                ; offset: $51 (81)
  1207. sizeof                     EQU *                    ; size:   $52 (82)
  1208.                         ENDR
  1209. DETAttributeCreationBlock RECORD 0
  1210. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1211. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1212. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1213. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource) 
  1214. parent                     ds.l    1                ; offset: $10 (16)        ;   -> The object within which the creation will occur 
  1215. refNum                     ds.w    1                ; offset: $14 (20)        ;   -> Refnum for returned address (DSSpecs in PDs only) 
  1216. identity                 ds.l    1                ; offset: $16 (22)        ;   -> The identity we're browsing as in the parent object 
  1217. attrType                 ds        AttributeType    ; offset: $1A (26)        ;  <-> The type of the attribute being created 
  1218. attrTag                     ds.l    1                ; offset: $3E (62)        ;  <-> The tag of the attribute being created 
  1219. value                     ds.l    1                ; offset: $42 (66)        ;  <-> The value to write (pre-allocated, resize as needed) 
  1220. sizeof                     EQU *                    ; size:   $46 (70)
  1221.                         ENDR
  1222. DETAttributeNewBlock    RECORD 0
  1223. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1224. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1225. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1226. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1227. ;     common to all invocations of code resource) 
  1228. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1229. ;     code resource) 
  1230. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1231. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1232. filler1                     ds.b    1                ; offset: $25 (37)
  1233. parent                     ds.l    1                ; offset: $26 (38)        ;   -> The object within which the creation will occur 
  1234. refNum                     ds.w    1                ; offset: $2A (42)        ;   -> Refnum for returned address (DSSpecs in PDs only) 
  1235. identity                 ds.l    1                ; offset: $2C (44)        ;   -> The identity we're browsing as in the parent object 
  1236. attrType                 ds        AttributeType    ; offset: $30 (48)        ;  <-> The type of the attribute being created 
  1237. attrTag                     ds.l    1                ; offset: $54 (84)        ;  <-> The tag of the attribute being created 
  1238. value                     ds.l    1                ; offset: $58 (88)        ;  <-> The value to write (pre-allocated, resize as needed) 
  1239. sizeof                     EQU *                    ; size:   $5C (92)
  1240.                         ENDR
  1241. DETAttributeChangeBlock    RECORD 0
  1242. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1243. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1244. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1245. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1246. ;     common to all invocations of code resource) 
  1247. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1248. ;     code resource) 
  1249. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1250. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1251. filler1                     ds.b    1                ; offset: $25 (37)
  1252. parent                     ds.l    1                ; offset: $26 (38)        ;   -> The object within which the creation will occur 
  1253. refNum                     ds.w    1                ; offset: $2A (42)        ;   -> Refnum for returned address (DSSpecs in PDs only) 
  1254. identity                 ds.l    1                ; offset: $2C (44)        ;   -> The identity we're browsing as in the parent object 
  1255. attrType                 ds        AttributeType    ; offset: $30 (48)        ;  <-> The type of the attribute being changed 
  1256. attrTag                     ds.l    1                ; offset: $54 (84)        ;  <-> The tag of the attribute being changed 
  1257. attrCID                     ds        AttributeCreationID ; offset: $58 (88) ;  <-> The CID of the attribute being changed 
  1258. value                     ds.l    1                ; offset: $60 (96)        ;  <-> The value to write (pre-allocated, resize as needed) 
  1259. sizeof                     EQU *                    ; size:   $64 (100)
  1260.                         ENDR
  1261. DETAttributeDeleteBlock    RECORD 0
  1262. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1263. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1264. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1265. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1266. ;     common to all invocations of code resource) 
  1267. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1268. ;     code resource) 
  1269. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1270. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1271. filler1                     ds.b    1                ; offset: $25 (37)
  1272. dsSpec                     ds.l    1                ; offset: $26 (38)        ;   -> The object which will be deleted 
  1273. refNum                     ds.w    1                ; offset: $2A (42)        ;   -> Refnum for returned address (DSSpecs in PDs only) 
  1274. identity                 ds.l    1                ; offset: $2C (44)        ;   -> The identity we're browsing as 
  1275. sizeof                     EQU *                    ; size:   $30 (48)
  1276.                         ENDR
  1277. DETItemNewBlock            RECORD 0
  1278. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1279. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1280. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1281. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1282. ;     common to all invocations of code resource) 
  1283. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1284. ;     code resource) 
  1285. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1286. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1287. filler1                     ds.b    1                ; offset: $25 (37)
  1288. sizeof                     EQU *                    ; size:   $26 (38)
  1289.                         ENDR
  1290. DETShouldSyncBlock        RECORD 0
  1291. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1292. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1293. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1294. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1295. ;     common to all invocations of code resource) 
  1296. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1297. ;     code resource) 
  1298. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1299. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1300. filler1                     ds.b    1                ; offset: $25 (37)
  1301. shouldSync                 ds.b    1                ; offset: $26 (38)        ;  <-  True if we should now sync with catalog 
  1302. filler2                     ds.b    1                ; offset: $27 (39)
  1303. sizeof                     EQU *                    ; size:   $28 (40)
  1304.                         ENDR
  1305. DETDoSyncBlock            RECORD 0
  1306. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1307. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1308. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1309. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1310. ;     common to all invocations of code resource) 
  1311. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1312. ;     code resource) 
  1313. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1314. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1315. filler1                     ds.b    1                ; offset: $25 (37)
  1316. sizeof                     EQU *                    ; size:   $26 (38)
  1317.                         ENDR
  1318. DETPatternInBlock        RECORD 0
  1319. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1320. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1321. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1322. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1323. ;     common to all invocations of code resource) 
  1324. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1325. ;     code resource) 
  1326. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1327. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1328. filler1                     ds.b    1                ; offset: $25 (37)
  1329. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1330. elementType                 ds.l    1                ; offset: $28 (40)        ;   -> Element type from pattern 
  1331. extra                     ds.l    1                ; offset: $2C (44)        ;   -> Extra field from pattern 
  1332. attribute                 ds.l    1                ; offset: $30 (48)        ;   -> The complete attribute 
  1333. dataOffset                 ds.l    1                ; offset: $34 (52)        ;  <-> Offset to current (next) byte 
  1334. bitOffset                 ds.w    1                ; offset: $38 (56)        ;  <-> Bit offset (next bit is *fData >> fBitOffset++) 
  1335. sizeof                     EQU *                    ; size:   $3A (58)
  1336.                         ENDR
  1337. DETPatternOutBlock        RECORD 0
  1338. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1339. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1340. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1341. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1342. ;     common to all invocations of code resource) 
  1343. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1344. ;     code resource) 
  1345. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1346. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1347. filler1                     ds.b    1                ; offset: $25 (37)
  1348. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1349. elementType                 ds.l    1                ; offset: $28 (40)        ;   -> Element type from pattern 
  1350. extra                     ds.l    1                ; offset: $2C (44)        ;   -> Extra field from pattern 
  1351. attribute                 ds.l    1                ; offset: $30 (48)        ;   -> The attribute (minus the data portion) 
  1352. data                     ds.l    1                ; offset: $34 (52)        ;   -> Data to be written (pre-allocated, resize and add at end) 
  1353. dataOffset                 ds.l    1                ; offset: $38 (56)        ;  <-> Offset to next byte to write 
  1354. bitOffset                 ds.w    1                ; offset: $3C (60)        ;  <-> Bit offset (if zero, handle will need to be resized to one more byte before write) 
  1355. sizeof                     EQU *                    ; size:   $3E (62)
  1356.                         ENDR
  1357. DETOpenSelfBlock        RECORD 0
  1358. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1359. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1360. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1361. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1362. ;     common to all invocations of code resource) 
  1363. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1364. ;     code resource) 
  1365. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1366. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1367. filler1                     ds.b    1                ; offset: $25 (37)
  1368. modifiers                 ds.w    1                ; offset: $26 (38)        ;   -> Modifiers at open time (option/control/command/shift keys) 
  1369. sizeof                     EQU *                    ; size:   $28 (40)
  1370.                         ENDR
  1371. DETConvertToNumberBlock    RECORD 0
  1372. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1373. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1374. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1375. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1376. ;     common to all invocations of code resource) 
  1377. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1378. ;     code resource) 
  1379. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1380. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1381. filler1                     ds.b    1                ; offset: $25 (37)
  1382. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1383. theValue                 ds.l    1                ; offset: $28 (40)        ;  <-  The converted value to return 
  1384. sizeof                     EQU *                    ; size:   $2C (44)
  1385.                         ENDR
  1386. DETConvertToRStringBlock RECORD 0
  1387. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1388. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1389. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1390. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1391. ;     common to all invocations of code resource) 
  1392. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1393. ;     code resource) 
  1394. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1395. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1396. filler1                     ds.b    1                ; offset: $25 (37)
  1397. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1398. theValue                 ds.l    1                ; offset: $28 (40)        ;  <-  A handle with the converted value (callee must allocate handle, DE will DisposHandle() it) 
  1399. sizeof                     EQU *                    ; size:   $2C (44)
  1400.                         ENDR
  1401. DETConvertFromNumberBlock RECORD 0
  1402. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1403. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1404. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1405. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1406. ;     common to all invocations of code resource) 
  1407. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1408. ;     code resource) 
  1409. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1410. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1411. filler1                     ds.b    1                ; offset: $25 (37)
  1412. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1413. theValue                 ds.l    1                ; offset: $28 (40)        ;   -> The value to convert (result should be written direct to the property) 
  1414. sizeof                     EQU *                    ; size:   $2C (44)
  1415.                         ENDR
  1416. DETConvertFromRStringBlock RECORD 0
  1417. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1418. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1419. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1420. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1421. ;     common to all invocations of code resource) 
  1422. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1423. ;     code resource) 
  1424. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1425. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1426. filler1                     ds.b    1                ; offset: $25 (37)
  1427. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1428. theValue                 ds.l    1                ; offset: $28 (40)        ;   -> The value to convert (result should be written direct to the property) 
  1429. sizeof                     EQU *                    ; size:   $2C (44)
  1430.                         ENDR
  1431. DETCustomViewDrawBlock    RECORD 0
  1432. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1433. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1434. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1435. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1436. ;     common to all invocations of code resource) 
  1437. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1438. ;     code resource) 
  1439. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1440. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1441. filler1                     ds.b    1                ; offset: $25 (37)
  1442. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1443. sizeof                     EQU *                    ; size:   $28 (40)
  1444.                         ENDR
  1445. DETCustomViewMouseDownBlock RECORD 0
  1446. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1447. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1448. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1449. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1450. ;     common to all invocations of code resource) 
  1451. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1452. ;     code resource) 
  1453. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1454. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1455. filler1                     ds.b    1                ; offset: $25 (37)
  1456. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1457. theEvent                 ds.l    1                ; offset: $28 (40)        ;   -> The original event record of the mouse-down 
  1458. sizeof                     EQU *                    ; size:   $2C (44)
  1459.                         ENDR
  1460. DETKeyPressBlock        RECORD 0
  1461. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1462. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1463. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1464. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1465. ;     common to all invocations of code resource) 
  1466. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1467. ;     code resource) 
  1468. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1469. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1470. filler1                     ds.b    1                ; offset: $25 (37)
  1471. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1472. theEvent                 ds.l    1                ; offset: $28 (40)        ;   -> The original event record of the key-press 
  1473. sizeof                     EQU *                    ; size:   $2C (44)
  1474.                         ENDR
  1475. DETPasteBlock            RECORD 0
  1476. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1477. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1478. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1479. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1480. ;     common to all invocations of code resource) 
  1481. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1482. ;     code resource) 
  1483. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1484. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1485. filler1                     ds.b    1                ; offset: $25 (37)
  1486. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1487. modifiers                 ds.w    1                ; offset: $28 (40)        ;   -> Modifiers at paste time (option/control/command/shift keys) 
  1488. sizeof                     EQU *                    ; size:   $2A (42)
  1489.                         ENDR
  1490. DETCustomMenuSelectedBlock RECORD 0
  1491. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1492. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1493. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1494. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1495. ;     common to all invocations of code resource) 
  1496. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1497. ;     code resource) 
  1498. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1499. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1500. filler1                     ds.b    1                ; offset: $25 (37)
  1501. menuTableParameter         ds.w    1                ; offset: $26 (38)        ;   -> The "property" field from the custom menu table 
  1502. sizeof                     EQU *                    ; size:   $28 (40)
  1503.                         ENDR
  1504. DETCustomMenuEnabledBlock RECORD 0
  1505. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1506. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1507. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1508. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1509. ;     common to all invocations of code resource) 
  1510. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1511. ;     code resource) 
  1512. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1513. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1514. filler1                     ds.b    1                ; offset: $25 (37)
  1515. menuTableParameter         ds.w    1                ; offset: $26 (38)        ;   -> The "property" field from the custom menu table 
  1516. enable                     ds.b    1                ; offset: $28 (40)        ;  <-  Whether to enable the menu item 
  1517. filler2                     ds.b    1                ; offset: $29 (41)
  1518. sizeof                     EQU *                    ; size:   $2A (42)
  1519.                         ENDR
  1520. DETForwarderListItem    RECORD 0
  1521. next                     ds.l    1                ; offset: $0 (0)        ;  Pointer to next item, or nil 
  1522. attributeValueTag         ds.l    1                ; offset: $4 (4)        ;  Tag of new templates (0 for none) 
  1523. rstrs                     ds        PackedPathName ; offset: $8 (8)            ;  Record type (empty if none), attrbute type (empty if none),list of template names to forward to 
  1524. sizeof                     EQU *                    ; size:   $408 (1032)
  1525.                         ENDR
  1526. ; typedef struct DETForwarderListItem *    DETForwarderListPtr
  1527.  
  1528. ; typedef DETForwarderListPtr *            DETForwarderListHandle
  1529.  
  1530. DETDynamicForwardersBlock RECORD 0
  1531. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1532. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1533. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1534. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource) 
  1535. forwarders                 ds.l    1                ; offset: $10 (16)        ;  <-  List of forwaders 
  1536. sizeof                     EQU *                    ; size:   $14 (20)
  1537.                         ENDR
  1538. DETDynamicResourceBlock    RECORD 0
  1539. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1540. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1541. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1542. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1543. ;     common to all invocations of code resource) 
  1544. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1545. ;     code resource) 
  1546. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1547. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1548. filler1                     ds.b    1                ; offset: $25 (37)
  1549. resourceType             ds.l    1                ; offset: $26 (38)        ;   -> The resource type being requested 
  1550. propertyNumber             ds.w    1                ; offset: $2A (42)        ;   -> The property number of the resource being requested 
  1551. resourceID                 ds.w    1                ; offset: $2C (44)        ;   -> The resource ID (base ID + property number) of the resource 
  1552. theResource                 ds.l    1                ; offset: $2E (46)        ;  <-  The requested resource 
  1553. sizeof                     EQU *                    ; size:   $32 (50)
  1554.                         ENDR
  1555.  
  1556. DETCallBlock            RECORD 0
  1557. protoCall                 ds        DETProtoCallBlock ; offset: $0 (0)
  1558.                          ORG 0
  1559. init                     ds        DETInitBlock    ; offset: $0 (0)
  1560.                          ORG 0
  1561. exit                     ds        DETExitBlock    ; offset: $0 (0)
  1562.                          ORG 0
  1563. instanceInit             ds        DETInstanceInitBlock ; offset: $0 (0)
  1564.                          ORG 0
  1565. instanceExit             ds        DETInstanceExitBlock ; offset: $0 (0)
  1566.                          ORG 0
  1567. instanceIdle             ds        DETInstanceIdleBlock ; offset: $0 (0)
  1568.                          ORG 0
  1569. propertyCommand             ds        DETPropertyCommandBlock ; offset: $0 (0)
  1570.                          ORG 0
  1571. maximumTextLength         ds        DETMaximumTextLengthBlock ; offset: $0 (0)
  1572.                          ORG 0
  1573. viewListChanged             ds        DETViewListChangedBlock ; offset: $0 (0)
  1574.                          ORG 0
  1575. propertyDirtied             ds        DETPropertyDirtiedBlock ; offset: $0 (0)
  1576.                          ORG 0
  1577. validateSave             ds        DETValidateSaveBlock ; offset: $0 (0)
  1578.                          ORG 0
  1579. dropQuery                 ds        DETDropQueryBlock ; offset: $0 (0)
  1580.                          ORG 0
  1581. dropMeQuery                 ds        DETDropMeQueryBlock ; offset: $0 (0)
  1582.                          ORG 0
  1583. attributeCreationBlock     ds        DETAttributeCreationBlock ; offset: $0 (0)
  1584.                          ORG 0
  1585. attributeNew             ds        DETAttributeNewBlock ; offset: $0 (0)
  1586.                          ORG 0
  1587. attributeChange             ds        DETAttributeChangeBlock ; offset: $0 (0)
  1588.                          ORG 0
  1589. attributeDelete             ds        DETAttributeDeleteBlock ; offset: $0 (0)
  1590.                          ORG 0
  1591. itemNew                     ds        DETItemNewBlock ; offset: $0 (0)
  1592.                          ORG 0
  1593. patternIn                 ds        DETPatternInBlock ; offset: $0 (0)
  1594.                          ORG 0
  1595. patternOut                 ds        DETPatternOutBlock ; offset: $0 (0)
  1596.                          ORG 0
  1597. shouldSync                 ds        DETShouldSyncBlock ; offset: $0 (0)
  1598.                          ORG 0
  1599. doSync                     ds        DETDoSyncBlock ; offset: $0 (0)
  1600.                          ORG 0
  1601. openSelf                 ds        DETOpenSelfBlock ; offset: $0 (0)
  1602.                          ORG 0
  1603. convertToNumber             ds        DETConvertToNumberBlock ; offset: $0 (0)
  1604.                          ORG 0
  1605. convertToRString         ds        DETConvertToRStringBlock ; offset: $0 (0)
  1606.                          ORG 0
  1607. convertFromNumber         ds        DETConvertFromNumberBlock ; offset: $0 (0)
  1608.                          ORG 0
  1609. convertFromRString         ds        DETConvertFromRStringBlock ; offset: $0 (0)
  1610.                          ORG 0
  1611. customViewDraw             ds        DETCustomViewDrawBlock ; offset: $0 (0)
  1612.                          ORG 0
  1613. customViewMouseDown         ds        DETCustomViewMouseDownBlock ; offset: $0 (0)
  1614.                          ORG 0
  1615. keyPress                 ds        DETKeyPressBlock ; offset: $0 (0)
  1616.                          ORG 0
  1617. paste                     ds        DETPasteBlock    ; offset: $0 (0)
  1618.                          ORG 0
  1619. customMenuSelected         ds        DETCustomMenuSelectedBlock ; offset: $0 (0)
  1620.                          ORG 0
  1621. customMenuEnabled         ds        DETCustomMenuEnabledBlock ; offset: $0 (0)
  1622.                          ORG 0
  1623. dynamicForwarders         ds        DETDynamicForwardersBlock ; offset: $0 (0)
  1624.                          ORG 0
  1625. dynamicResource             ds        DETDynamicResourceBlock ; offset: $0 (0)
  1626.                          ORG 100
  1627. sizeof                     EQU *                    ; size:   $64 (100)
  1628.                         ENDR
  1629. ;  Call-for list: 
  1630.  
  1631. kDETCallForOther                EQU        1                    ; Call for things not listed below (also auto-enabled by DE if any of the below are enabled) 
  1632. kDETCallForIdle                    EQU        2                    ; kDETcmdIdle 
  1633. kDETCallForCommands                EQU        4                    ; kDETcmdPropertyCommand, kDETcmdSelfOpen 
  1634. kDETCallForViewChanges            EQU        8                    ; kDETcmdViewListChanged, kDETcmdPropertyDirtied, kDETcmdMaximumTextLength 
  1635. kDETCallForDrops                EQU        $10                    ; kDETcmdDropQuery, kDETcmdDropMeQuery 
  1636. kDETCallForAttributes            EQU        $20                    ; kDETcmdAttributeCreation, kDETcmdAttributeNew, kDETcmdAttributeChange, kDETcmdAttributeDelete 
  1637. kDETCallForValidation            EQU        $40                    ; kDETcmdValidateSave 
  1638. kDETCallForKeyPresses            EQU        $80                    ; kDETcmdKeyPress and kDETcmdPaste 
  1639. kDETCallForResources            EQU        $0100                ; kDETcmdDynamicResource 
  1640. kDETCallForSyncing                EQU        $0200                ; kDETcmdShouldSync, kDETcmdDoSync 
  1641. kDETCallForEscalation            EQU        $8000                ; All calls escalated from the next lower level 
  1642. kDETCallForNothing                EQU        0                    ; None of the above 
  1643. kDETCallForEverything            EQU        $FFFFFFFF            ; All of the above 
  1644. ; typedef DETCallUPP                     DETCall
  1645.  
  1646. ;  This following macro saves you from having to dig out the call-back pointer from the call block: 
  1647. ; ***********************************************************************************
  1648. ; ********************************* SAM Definitions: ********************************
  1649. ; ***********************************************************************************
  1650. ;  SAM Developers should use property numbers starting at this point: 
  1651.  
  1652. kSAMFirstDevProperty            EQU        50
  1653.  
  1654. ;    SAM templates have additional resources/properties that are required
  1655. ;    for interaction with the AOCE Key Chain.
  1656. ;    
  1657. ;     Type    Offset                        Description
  1658. ;     ----    ------                        -----------
  1659. ;    'rstr'    kSAMAspectUserName            The user name
  1660. ;    'rstr'    kSAMAspectKind                The kind of SAM
  1661. ;    'detn'    kSAMAspectCannotDelete        If 0, then the slot cannot be deleted
  1662. ;    'sami'    kSAMAspectSlotCreationInfo    The info required to create a slot record
  1663. ;
  1664.  
  1665.  
  1666. kSAMAspectUserName                EQU        41
  1667. kSAMAspectKind                    EQU        42
  1668. kSAMAspectCannotDelete            EQU        43
  1669. kSAMAspectSlotCreationInfo        EQU        44
  1670. ; **************************************************************************************
  1671. ; ********************************* Admin Definitions: *********************************
  1672. ; *************************************************************************************
  1673.  
  1674.  
  1675. kDETAdminVersion                EQU        -978
  1676.  
  1677.  
  1678.     ENDIF ; __OCETEMPLATES__ 
  1679.  
  1680.